/**
 * 融资融券接口
 */
import Axios from '@/utils/request';

/**
 * 查询融资融券标的券、担保券
 */
export function queryMarginTradingStocks(data): Promise<any> {
    return Axios.post('/rzrq/stocks', data);
}

/**
 * 查询融资持仓、融券标的券持仓、担保券持仓
 */
export function queryMarginTradingPosiotions(data): Promise<any> {
    return Axios.post('/rzrq/stocks/position', data);
}

/**
 * 查询包含资产单元为融资融券信用资产单元的基金列表
 */
export function queryMarginTradingFunds(): Promise<any> {
    return Axios.post('/rzrq/fundList');
}

/**
 * 查询带权限的产品列表
 */
export function queryPermissionFunds(data): Promise<any> {
    return Axios.get('/fundInfo/list/byUser/like?fundCodeOrName=' + encodeURIComponent(data));
}

/**
 * 查询融资融券可申购证券
 */
export function querySubsStock(data): Promise<any> {
    return Axios.post('/rzrq/subsStock', data);
}
